#coding: utf-8
require 'chat'

if ARGV.size != 3
  puts "Usage: #{$0} <jid> <password> <room@conference/nick>"
  exit
end
#need it to wake up...
jid,password,conf = ARGV[0..2]
puts jid + password + conf
muc = Chat.new(jid,password,conf)
mainthread = Thread.current
muc.join
Thread.stop
#muc.say 'lastpost /s/'
#sleep until wake up by on_*

